CURL is a tool that uses URL syntax to transmit files and data. it supports many protocols, such as HTTP, FTP, and TELNET. the best thing is that PHP also supports the cURL Library. PHP cURL library can be simple
1. what is CURL?CURL is a tool that
One, what is curl?CURL is a tool that uses URL syntax to transfer files and data, and supports many protocols, such as HTTP, FTP, Telnet, and so on. Best of all, PHP also supports the CURL library. Using the PHP Curl Library, you can easily and
CURL is a tool that uses URL syntax to transfer files and data, and supports many protocols, such as HTTP, FTP, Telnet, and so on. Best of all, PHP also supports the CURL library. Using the PHP Curl Library, you can easily and effectively grab pages.
index.php/*Using the PHP Curl Library, you can easily and effectively grab pages. Just run a script, then analyze the crawled pages, and then you can get the data you want in a program.Whether you want to take part of the data from a link, or take
Case:Today to upload a file to a server, the original is Curl's get mode, now use the post mode, according to the original thought, the code is as follows1PHP2 $post[' c '] = ' config ';3 $post[' t '] = ' show ';4 $post[' o '] = ' xml ';5 $post['
Curl simulates password retrieval (Huaxia insurance) to directly retrieve the password page www. ihxlife. comforget... if you enter the mobile phone number 15677748704 (test) to obtain the verification code, the system will prompt that the
PHP curl can be used to crawl Web pages, analysis of Web data use, simple and easy-to-use, here to introduce its functions, such as not detailed description, put the code to see:
Only a few of the main functions are retained. To implement a mock
Curl Simulation Recover password (Huaxia insurance) directly retrieve Password page http://www.ihxlife.com/forget ...Enter phone number 15677748704 (test) Get verification code directly prompts for CAPTCHA errorBut first enter the official website
Php uses curl to simulate post request to submit xml
Php uses curl to simulate the xml submission of post requests (the interface on the Java server is requested)However, the request using httprequest in jsp can be successful.In JAVA, post
There are a lot of previous talk about PHP curl function to implement post submission data, let me introduce a kind of commit XML to submit form data.
Example 1
Curl uses post to submit XML data
The code is as follows
Copy Code
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.